Skip to main content

Using online model scores as predictors

4 Tasks

15 mins

Pega Customer Decision Hub '23
Visible to: All users
Beginner Pega Customer Decision Hub '23 English

Scenario

U+ Bank is implementing cross-selling of its products on the web by using Pega Customer Decision Hub™. The U+ Bank data science team develops predictive models, including models that predict the likelihood of a customer discontinuing a service or even leaving the bank. To further enhance the predictive power of the adaptive models, you create a parameterized predictor that is the on-the-fly score of a predictive churn model that runs in Customer Decision Hub. The parameter references a newly created churn prediction.

Use the following credentials to log in to the exercise system:

Role User name Password
Data Scientist DataScientist rules

Your assignment consists of the following tasks:

Task 1: Create a property to store the parameter value

In Next-Best-Action Designer, create the ChurnRisk property to store a customer's propensity to churn.

Task 2: Create a churn prediction

Create a churn prediction and replace the placeholder scorecard with the ChurnH2O model. Map the output of the model to the ChurnRisk property.

Task 3: Add ChurnRisk as a parameterized predictor

Configure the Predict Web Propensity prediction to store the results in the CDH-SR class. Add the ChurnRisk field as a parameterized predictor to the adaptive model that drives the prediction.

Task 4: Configure the pre-processing extension strategy

In the NBAPreProcessExtension strategy, reference the churn prediction.

 

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Create a property to store the parameter value

  1. On the exercise system landing page, click Launch Pega Infinity™ to log in to Customer Decision Hub.
  2. Log in as a Data Scientist:
    1. In the User name field, enter DataScientist.
    2. In the Password field, enter rules.
  3. In the navigation pane of Customer Decision Hub, click Next-Best-Action > Designer.
  4. In Next-Best-Action Designer, click the Taxonomy tab, and then click the Properties tab.
  5. Click Edit, and then click Add property to create the new property.
  6. In the Create property dialog box, configure the property:
    1. In the Name field, enter ChurnRisk.
    2. In the Property type field, select Decimal.
    3. In the Property usage section, select Dynamic.
    4. Clear the Include this property in strategy results for Inbound channels checkbox.
    5. Clear the This property is persisted to storage and available for offer processing checkbox.
      create property dialog box
    6. Click Submit to close the dialog box.
  7. Click Save to save the Taxonomy configuration.
    Note: Saving the taxonomy might take some time as the system regenerates the entire Next-Best-Action framework.

2 Create a churn prediction

  1. In the navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio.
  2. In the upper-right corner of Prediction Studio, click New to create a prediction.
  3. Ensure that Customer Decision Hub is the active selection, and then click Next to configure the prediction:
    1. In the Prediction name field, enter Predict Churn Propensity.
    2. In the Outcome field, select Churn.
    3. In the Subject field, select Customer.
      Create a prediction dialog box
    4. Click Create.
  4. Download the ChurnH2O.zip file to your local machine.
  5. Click the Models tab, and then in the Churn section, in the Predict Churn Propensity prediction row, click the More icon.
    The Models More navigation
  6. Click Replace Scorecard, and then configure the churn model:
    Replace the scorecard
    1. In the Replace model dialog box, select Model, and then click Next.
    2. Click Choose File, select the ChurnH2O.zip file, and then click Next.
    3. Ensure that the Compare models checkbox is clear, and then click Next.
    4. In the Candidate model name field, enter ChurnH2O, and then click Add challenger model to add the ChurnH2O model to the prediction.
  7. When the status of the ChurnH2O model changes to Challenger (pending review), click the More icon in the ChurnH2O (M-1) row, and then select Approve challenger model.
  8. Enter appropriate comments, and then click Approve.

3 Configure the pre-processing extension strategy

  1. In the header of Customer Decision Hub, in the Search field, enter NBAPreProcessExtension, and then press the Enter key.
  2. In the search results, click NBAPreProcessExtension to open the strategy.
  3. In the upper-right corner, click Save as.
  4. In the Context section, in the Apply to field, enter or select Data-Decision-Request-Customer-CDH.
  5. In the Strategy Record Configuration section, define the strategy in the CDH-SR class.
    Set Class to CDH-SR
  6. In the upper-right corner, click Create and open to edit the strategy.
  7. On the canvas, right-click, and then select Prediction.
  8. Right-click the Prediction component, and then select Properties to configure the component:
    1. Select Run prediction on Another page.
    2. In the Page field, enter or select Primary, and then select Customer.
    3. Confirm that the UBank-CDH-Data-Customer class auto-populates.
    4. In the Prediction field, enter or select PredictChurnPropensity.
      Prediction properties dialog box
    5. Click Submit to close the dialog box.
  9. Right-click the canvas, and then select Enrichment > Set property.
  10. Right-click the Set Property component, and then click Properties to configure the component:
    1. In the Name field, enter Set Churn Risk.
    2. In the Define action, target, and source section, click Add item.
    3. In the Target field, enter or select .ChurnRisk.
    4. In the Source field, enter or select .pyPropensity.
    5. Click Submit to close the dialog box.
  11. Connect the strategy components, as shown in the following figure:
    The modified extension strategy
  12. In the upper-right corner, click Save.

4 Add ChurnRisk as a parameterized predictor

  1. In the navigation pane of Prediction Studio, click Predictions.
  2. On the Predict Web Propensity tile, click Open prediction to edit the prediction.
  3. Click the Settings tab, and then in the Prediction details section, click Configure.
  4. In the Save results to section, select CDH-SR.
  5. Click Submit to close the dialog box.
  6. In the Confirm dialog box, click Yes.
  7. In the upper-right corner, click Save.
  8. Click the Models tab, and then in the Web Click Through Rate Customer row, click 6 Parameters to edit the parameters.
  9. In the Edit Parameters dialog box, click Add parameterized predictor to configure the parameter:
    1. In the Name field of the new parameter, enter ChurnRisk.
    2. In the Data type list, select Decimal.
    3. In the upper-right corner of the dialog box, click the Next Page icon.
    4. Confirm that the Predictor type of the new parameter is numeric.
    5. In the Field field, select .ChurnRisk.
    6. Click Submit to close the dialog box.
  10. In the upper-right corner, click Submit for deployment.
  11. In the Submit prediction for deployment dialog box, enter appropriate comments, and then click Submit.
    Note: A System Architect must merge the changes made to the prediction before they take effect.
  1. In the lower-left corner, click Back to Customer Decision Hub.

Confirm your work

  1. Open the Test run pane on the right to test the extension strategy.
  2. In the Settings section, configure the test run:
    1. In the Data transform field, enter or select Troy.
    2. In the ChannelContext field, enter WebInbound.
    3. In the For external inputs use strategy field, enter or select Trigger_NBA_TopLevel.
  3. Click Save & Run.
  4. Confirm that the system populates the ChurnRisk field.
    Churn Risk is populated


Available in the following missions:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice